import org.apache.commons.dbcp.BasicDataSource
import org.codehaus.groovy.grails.orm.hibernate.ConfigurableLocalSessionFactoryBean;

beans {

	xmlns gorm:"http://grails.org/schema/gorm"
	

	dataSourceSource(BasicDataSource) {
		driverClassName = "org.h2.Driver"
		url = "jdbc:h2:./data/h2/test_source"
		username = "root"
		password = ""
	}
	

	gorm{
		sessionFactory("data-source-ref":"dataSourceSource", "base-package":"source"){
			hibernateProperties = [	"hibernate.hbm2ddl.auto" : "validate", 
									"hibernate.dialect" : "org.hibernate.dialect.H2Dialect"]
			
		}
	}
	
	gormHelperDestination(com.burtbeckwith.gorm.GormHelper, ["source.TableSource"]){
	}
}

/*
MSSQL
dialect org.hibernate.dialect.SQLServerDialect
dataSourceSource(BasicDataSource) {
		driverClassName = "net.sourceforge.jtds.jdbc.Driver"
		url = "jdbc:jtds:sqlserver://<host>:1433/comedor"
		username = "sa"
		password = "sqladmin"
	}
	
	
H2
dialect org.hibernate.dialect.H2Dialect
dataSourceSource(BasicDataSource) {
		driverClassName = "org.h2.Driver"
		url = "jdbc:h2:./data/h2/test_source"
		username = "root"
		password = ""
	}
	
Oracle
dialect org.hibernate.dialect.Oracle10gDialect
dataSourceSource(BasicDataSource) {
		driverClassName = "oracle.jdbc.OracleDriver"
		url = "jdbc:oracle:thin:@172.26.0.4:1521:orcl2"
		username = "scott"
		password = "tiger"
	}
	
Mysql
org.hibernate.dialect.MySQL5InnoDBDialect
dataSourceSource(BasicDataSource) {
		driverClassName = "com.mysql.jdbc.Driver"
		url = "jdbc:mysql://localhost:3306/test_source"
		username = "root"
		password = ""
	}
*/